package com.vehicle.contract.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.vehicle.common.core.annotation.Excel;
import com.vehicle.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 身份证对象 t_id_cards
 *
 * @author XU
 * @date 2025-03-28
 */
public class TIdCards extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 身份证信息唯一标识，自增主键 */
    @Excel(name = "身份证信息唯一标识，自增主键")
    private Long idCardId;

    /** 关联的用户 ID，对应 users 表的 user_id */
    @Excel(name = "关联的用户 ID，对应 users 表的 user_id")
    private Long userId;

    /** 身份证号码，需唯一 */
    @Excel(name = "身份证号码，需唯一")
    private String idCardNumber;

    /** 身份证上登记的姓名 */
    @Excel(name = "身份证上登记的姓名")
    private String name;

    /** 用户性别 */
    @Excel(name = "用户性别")
    private String gender;

    /** 用户出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthDate;

    /** 身份证登记的住址 */
    @Excel(name = "身份证登记的住址")
    private String address;

    /** 身份证发证日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "身份证发证日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date issueDate;

    /** 身份证有效期截止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "身份证有效期截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    public void setIdCardId(Long idCardId)
    {
        this.idCardId = idCardId;
    }

    public Long getIdCardId()
    {
        return idCardId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setIdCardNumber(String idCardNumber)
    {
        this.idCardNumber = idCardNumber;
    }

    public String getIdCardNumber()
    {
        return idCardNumber;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setGender(String gender)
    {
        this.gender = gender;
    }

    public String getGender()
    {
        return gender;
    }
    public void setBirthDate(Date birthDate)
    {
        this.birthDate = birthDate;
    }

    public Date getBirthDate()
    {
        return birthDate;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getAddress()
    {
        return address;
    }
    public void setIssueDate(Date issueDate)
    {
        this.issueDate = issueDate;
    }

    public Date getIssueDate()
    {
        return issueDate;
    }
    public void setExpirationDate(Date expirationDate)
    {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate()
    {
        return expirationDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("idCardId", getIdCardId())
            .append("userId", getUserId())
            .append("idCardNumber", getIdCardNumber())
            .append("name", getName())
            .append("gender", getGender())
            .append("birthDate", getBirthDate())
            .append("address", getAddress())
            .append("issueDate", getIssueDate())
            .append("expirationDate", getExpirationDate())
            .toString();
    }
}
